﻿using System;
using System.Collections.Generic;
using System.Text;
using JDML.Attributes;

namespace JDML.TestPoco
{
            
    [Table(TableName = "User_Role", ReloadAfterInsert = true, ReloadAfterUpdate = true)]
    //[Select("Select * from User_Role where User_Role_ID=@ID")]

    //[SQL("byID", "Select * from User_Role where User_Role_ID=@ID")]
    //[SQL("byName", "Select * from User_Role where User_Role_Name=@Name")]
    //[SQL(MappingClass.SQLCmdType.Select, "Select * from User_Role where User_Role_ID=@ID")]
    //[SQL(MappingClass.SQLCmdType.Insert, "Insert Into User_Role (User_Role_Name,User_Role_Permission) values (@Name,@Permission)")]
    //[SQL(MappingClass.SQLCmdType.Select, "Select * from User_Role where User_Role_ID=@ID")]
    [SQL(MappingClass.SQLCmdType.Select, "byName","Select * from User_Role where User_Role_Name=@Name")]
    //[SQL(MappingClass.SQLCmdType.Update, "update User_Role set User_Role_Permission=@Permission where User_Role_ID=@ID", ReloadAfterUpdate = true)]
    [SQL(MappingClass.SQLCmdType.Delete, "delete from User_Role where User_Role_ID=@ID")]
    //[SQL("byID", "Select * from User_Role where User_Role_ID=@ID")]
    public class UserRole
    {
        //[Field("User_Role_ID", true)]
        [Field(FieldName = "User_Role_ID", PrimaryKey = true, AutoGenerate = true)]
        public int? ID { get; set; }
        [Field(FieldName = "User_Role_Name", PrimaryKey = false)]
        public string Name; //{ get; set; }
        [Field("User_Role_Permission", false, false)]
        public string Permission { get; set; }
        [Field("User_Role_Remark")]
        public string Remark { get; set; }
        public DateTime? UpdateTime { get; set; }
    }
}

        
